﻿@{
    ViewBag.Title = "材料运行单管理";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<link href="~/Content/css/MaterialOperation_print.css" rel="stylesheet" media="print" />
<style type="text/css">
    #print {
        display: none;
    }

    .tool_c {
        padding: 10px 0;
    }

    .btn-group {
        padding: 0 10px 0 0;
    }

    .frozen-bdiv tr:not(.jqgfirstrow) td {
        height: 45px !important;
    }

    .grid_list_2_c {
        overflow: hidden;
    }

        .grid_list_2_c .frozen-bdiv {
            top: 51px !important;
        }

        .grid_list_2_c .frozen-div {
            height: 51px !important;
        }

        .grid_list_2_c .ui-jqgrid-hdiv {
            width: 1900px !important;
            background-color: transparent !important;
        }

        .grid_list_2_c .ui-jqgrid-bdiv {
            width: 1900px !important;
            background-color: transparent !important;
        }

        .grid_list_2_c .ui-jqgrid-btable {
            background-color: #fff !important;
        }

    .btn-group:last-child a.btn:first-child {
        margin: 0 0.5em 0 0 !important;
    }

    .input_inline input {
        display: inline-block;
        width: 4em;
    }

    .btn-group input[type=text] {
        height: 2em !important;
    }
</style>
<script>
    $(function () {
        Index.init();
    });

    var Index = {
        printTemplate: null,
        dataList: {
            "0": null,
            "1": null
        },
        init: function () {
            with (Index) {
                initControl();

                loadDataList();

                printTemplate = $("#print .page:first").html();
            }
        },
        initControl: function () {
            var o = {
                "0": "i11,i12,i13,i14,i15,i16,i17,i18".split(","),
                "1": "i13,i15,i16,i17,i19".split(",")
            };

            $("[name=ra0]").on("click", function () {
                $(".i1").hide(0);

                var arr = o[$(this).val()];

                arr.forEach(function (cur) {
                    $(".{0}".format(cur)).fadeIn(100);
                });

            });

            $("[name=ra0]:first").trigger("click");

            $.renderMy97Datepicker();

            $("[my97date]").val(new Date().format("yyyyMM"));


            $.loadDataForSelect("编辑,发布,作废".split(','), $("#MaintainStatus1"));

            //要货单位
            $("#RequireCompanyNO1").bindSelect({
                url: "/ProductionPlan/PreparationMaterials/GetRequireCompanies",
                id: "MakeLineNO",
                text: "MakeLineName"
            });

            $('select').bindSelect();

            //批次查询 btn_search1
            $("#btn_search1").on("click", function (e, data) {
                var idx = $("[name=ra0]:checked").val();
                
                !!data && (idx = data);

                0 == idx && (function () {
                    var $gridList1 = $("#gridList1");

                    var conn1 = $.buildPostParam("ProductMonth,MaintainStatus,RequireCompanyNO,MatNO,ProductionNO,FProductionName,MaterialCode_SJJL,MaterialSizes_SJJL", "1");

                    $gridList1.jqGrid('setGridParam', {
                        postData: conn1,
                    }).trigger('reloadGrid');
                })();

                1 == idx && (function () {
                    var $gridList2 = $("#gridList2");

                    var conn2 = $.buildPostParam("ProductMonth,MaintainStatus,RequireCompanyNO,MatNO,ProductionNO,FProductionName,MaterialCode_SJJL,MaterialSizes_SJJL", "1");

                    $gridList2.jqGrid('setGridParam', {
                        postData: conn2,
                    }).trigger('reloadGrid');
                })();
            });

            $("#butnDelete").on("click", function () {
                var selecteds = null, id = null;

                var num = $("#gridList1").jqGrid("getGridParam", "selrow");

                !!num || $.modalAlert("请先选择要删除的数据");

                !!num && (function () {
                    id = Index.dataList["0"][num - 1]["MatNO"];

                    $.modalConfirm("是否确定删除选中记录？", function (foo) {
                        foo && (function () {
                            $.post("/ProductionPlan/PreparationMaterials/DeleteMaterialOperation", { id: id }, function (res) {
                                0 < parseInt(res, 10) && (function () {
                                    $("#btn_search1").trigger("click");
                                })();
                            });
                        })();
                    }, true);
                })();
            });
            //作废
            $("#butnGoInvalid").on("click", function () {
                var selecteds = null, id = null;

                var num = $("#gridList2").jqGrid("getGridParam", "selrow");

                !!num || $.modalAlert("请先选择要废选的数据");

                !!num && (function () {
                    id = Index.dataList["1"][num - 1]["MatNO"];

                    $.modalConfirm("是否确定作废选中记录？", function (foo) {
                        foo && (function () {
                            $.post("/ProductionPlan/PreparationMaterials/InvalidMaterialOperation", { id: id }, function (res) {
                                0 < parseInt(res, 10) && (function () {
                                    $("#btn_search1").trigger("click", [1]);
                                })();
                            });
                        })();
                    }, true);
                })();
            });
            //发布
            $("#butnPublish").on("click", function () {
                var selecteds = $(".i18 :checked").toArray(), ids = [];

                selecteds.forEach(function (selected) {
                    ids.push($(selected).val());
                });

                !!ids.length || $.modalAlert("请先选择要发布的数据");

                !!ids.length && (function () {
                    $.modalConfirm("是否确定发布选中记录？", function (foo) {
                        foo && (function () {
                            $.post("/ProductionPlan/PreparationMaterials/PublishMaterialOperations", { ids: ids.join(",") }, function (res) {
                                0 < parseInt(res, 10) && (function () {
                                    $("#btn_search1").trigger("click");
                                })();
                            });
                        })();
                    }, true);
                })();
            });
            //方案
            $("#butnGoScheme").on("click", function () {
                var idx = $("[name=ra0]:checked").val(), isArchive = false, MATNOS = [];

                isArchive = 1 == idx;

                var data = Index.dataList[idx];

                var num = $("#gridList{0}".format(parseInt(idx, 10) + 1)).jqGrid("getGridParam", "selrow");

                !!num || $.modalAlert("请选择需要查看详情的数据。", "error");

                !!num && (function () {
                    var MatNO = data[num - 1]["MatNO"];

                    var url = "/ProductionPlan/PreparationMaterials/MaterialOperationDetails?MatNO={0}&archive={1}".format(MatNO,idx);

                    location.href = url;
                })();
            });
            //方案
            $("#butnPrint").on("click", function () {
                var idx = $("[name=ra0]:checked").val();

                var data = Index.dataList[idx];

                var num = $("#gridList{0}".format(parseInt(idx, 10) + 1)).jqGrid("getGridParam", "selrow");

                !!num || $.modalAlert("请选择需要打印的数据。", "error");

                !!num && (function () {
                    var MatNO = data[num - 1]["MatNO"];

                    var isArchive = (idx == 1);

                    Index.printItem(MatNO, isArchive, function (res) {

                        var ocs = [
                        { dics: "编辑,发布,作废".split(","), cols: "MaintainStatus".split(",") },
                        { dics: "否,是".split(","), cols: "isJQ,FIsWW,IsBZGY,IsImg".split(",") }
                        ];

                        ocs.forEach(function (oc) {
                            $.each(oc.cols, function (i, n) {
                                res[n] = oc.dics[res[n]];
                            });
                        });
                        
                        var t = "({0},{1})", czs = [
                                                            { "KFGC_KZGC": "KFGC,KZGC".split(",") },
                                                            { "CFGC_CZGC": "CFGC,CZGC".split(",") }
                                                            ];

                        czs.forEach(function (cz) {
                            for (var idx in cz) {
                                var r = t.format(res[cz[idx][0]], res[cz[idx][1]]);

                                ("" == res[cz[idx][0]] && "" == res[cz[idx][1]]) && (r = "");

                                res[idx] = r;
                            }
                        });

                        for (var idx in res) {
                            !!res[idx] || (res[idx] = "");
                        }

                        res["title"] = "{0}材料运行单".format(new Date(res["InputDate"]).format("yyyy年MM月dd日"));

                        res["bar_code"] = "/Common/GetBarCode?text={0}&width=300&height=90".format(res["MatNO"]);

                        res["qr_code"] = "/Common/GetQrcode?text={0}".format(res["MatNO"]);

                        var url = "/ProductionPlan/PreparationMaterials/GetMaterialOperationImage?Pic_ID={0}&IsImgStr={1}".format(res["Pic_ID"], res["IsImg"]);

                        res["image"] = "<img src=\"{0}\" alt=\"{1}\"/>".format(url, res["Pic_ID"]);

                        var html = Index.printTemplate.format(res);

                        $("#print").html(html).jqprint();
                    });
                })();
            });
            //导出
            $("#butnExport").on("click", function () {
                var idx = $("[name=ra0]:checked").val();

                var param = { id: "V_LJPC_TL_RunDouListAcco", param: Index.buildExportConn("ProductMonth,MaintainStatus,RequireCompanyNO,MatNO,ProductionNO,FProductionName,MaterialCode_SJJL,MaterialSizes_SJJL".split(","), "1") };

                ("1" == idx) && (function () {
                    param.id = "V_LJPC_TL_RunDouListAcco_da";
                })();
           
                var url = "/Common/ExcelExportById?{0}".format($.param(param));

                location.href = url;
            });
        },
        printItem: function (MatNO, isArchive, onLoadComplate) {
            $.post("/ProductionPlan/PreparationMaterials/GetMaterialOperationPrintData",
                    { MatNO: MatNO, isArchive: isArchive },
                    function (res) {
                        onLoadComplate && onLoadComplate(res);
                    }, "json");
        },
        loadDataList: function () {
            //ProductDate MaintainStatus RequireCompanyNO MatNO ProductionNO ProductionName MaterialCode_SJJL MaterialSizes_SJJL
            var conn1 = $.buildPostParam("ProductMonth,MaintainStatus,RequireCompanyNO,MatNO,ProductionNO,FProductionName,MaterialCode_SJJL,MaterialSizes_SJJL", "1");

            var onSelectedFormat = function (cellvalue, options, rowObject) {
                return "<input type=\"checkbox\" value=\"{0}\"/>".format(cellvalue);
            };

            var onPercentFormat = function (cellvalue, options, rowObject) {
                return "{v}%".format({ v: cellvalue });
            };

            var onMaterialFormat = function (cellvalue, options, rowObject) {
                var vals = cellvalue.split("|"), template = "工艺：{0}<br/>实际：{1}", result = "";

                "|" != $.trim(cellvalue) && (result = template.format(vals[0], vals[1]));

                return result;
            };

            var onGCFormat = function (cellvalue, options, rowObject) {
                var vals = cellvalue.split("|"), template = "({0},{1})", result = "";

                "|" != $.trim(cellvalue) && (result = template.format(vals[0], vals[1]));

                return result;
            };

            var onLoadDicsFormat = function (cellvalue, options, rowObject) {
                var result = "", dics = "否,是".split(",");

                !!dics[cellvalue] && (result = dics[cellvalue]);

                return result;
            };

            var onLoadDicsFormat2 = function (cellvalue, options, rowObject) {
                var result = "", dics = "编辑,发布,作废".split(",");

                !!dics[cellvalue] && (result = dics[cellvalue]);

                return result;
            };

            var $gridList1 = $("#gridList1");

            $gridList1.dataGridForJson({
                url: "/ProductionPlan/PreparationMaterials/GetMaterialOperationsEdit",
                postData: conn1,
                height: $(window).height() - 220,
                colModel: [
                { label: '选择', name: 'MatNO', width: 40, align: 'left', sortable: false, formatter: onSelectedFormat, frozen: true },
                 { label: '编辑日期', name: 'FCreateDate_FCreateTime', width: 160, align: 'center', sortable: false, frozen: true },
                { label: '生产日期', name: 'ProductDate', width: 80, align: 'center', sortable: false, frozen: true },
                { label: '运行单号', name: 'MatNO', width: 160, align: 'left', sortable: false, frozen: true },
                { label: '状态', name: 'MaintainStatus', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat2 },
                { label: '是否<br/>剪切', name: 'isJQ', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat },
                { label: '是否<br/>外委', name: 'FIsWW', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat },
                { label: '下料<br/>方式', name: 'IsBZGY', width: 40, align: 'center', sortable: true, frozen: true },
                { label: '剪切<br/>图形', name: 'IsImg', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat },
                { label: '生产单位(隐藏)', name: 'ProductCompany', width: 90, align: 'left', sortable: false, hidden: true },
                { label: '生产单位', name: 'ProductCompanyName', width: 120, align: 'left', sortable: false },
                { label: '生产车间<br/>(要货单位)', name: 'WorkShop', width: 120, align: 'left', sortable: false, hidden: true },
                { label: '生产车间', name: 'WorkShopName', width: 120, align: 'left', sortable: false },
                { label: '需求单位', name: 'RequireCompanyNO', width: 60, align: 'left', sortable: false, hidden: true },
                { label: '需求单位', name: 'RequireCompanyName', width: 120, align: 'left', sortable: false },
               { label: '供货单位', name: 'ProCompanyNO', width: 90, align: 'left', sortable: false, hidden: true },
                { label: '供货单位', name: 'ProCompanyName', width: 120, align: 'left', sortable: false },
                { label: '零件编号', name: 'ProductionNO', width: 120, align: 'left', sortable: false },
                { label: '零件名称', name: 'ProductionName', width: 160, align: 'left', sortable: false },
                { label: '零件标准<br/>装箱数', name: 'Fcontent', width: 80, align: 'right', sortable: true },
                { label: '投料产量', name: 'TLCL', width: 80, align: 'right', sortable: false, formatter: "number" },
                { label: '投料重量<br/>(kg)', name: 'TLZL', width: 80, align: 'right', sortable: false, formatter: "number" },
                { label: '钢板张数', name: 'Actual _ZTLZS', width: 60, align: 'right', sortable: false },
                 { label: '计划开卷板料张数(隐藏)', name: 'Plane_KJZS', width: 80, align: 'right', sortable: false, hidden: true },
                 { label: '计划开卷板料重量(隐藏)', name: 'Plane_KJZL', width: 120, align: 'right', sortable: false, hidden: true },
                { label: '计划实际板料张数（隐藏）', name: 'Plane_SJZS', width: 120, align: 'right', sortable: false, hidden: true },
                { label: '计划实际板料重量（隐藏）', name: 'Plane_SJZL', width: 100, align: 'right', sortable: false, hidden: true },
                { label: '材料分类(隐藏)', name: 'MaterialNO', width: 100, align: 'right', sortable: false, hidden: true },
                { label: '材料分类', name: 'MaterialName', width: 120, align: 'left', sortable: false },
                { label: '卷料牌号', name: 'MaterialCode_YCL_MaterialCode_SJJL', width: 140, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '卷料规格', name: 'MaterialSizes_YCL_MaterialSizes_BL', width: 200, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '板料牌号', name: 'MaterialCode_BL_MaterialCode_SJBL', width: 140, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '板料规格', name: 'MaterialSizes_BL_MaterialSizes_SJBL', width: 200, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '工艺卷料牌号(隐藏)', name: 'MaterialCode_YCL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '工艺卷料规格(隐藏)', name: 'MaterialSizes_YCL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '工艺板料牌号(隐藏)', name: 'MaterialCode_BL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '工艺板料规格(隐藏)', name: 'MaterialSizes_BL', width: 80, align: 'right', sortable: false, hidden: true },
                { label: '工艺标准编号(隐藏)', name: 'StandardNumber_YCL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '工艺特殊要求(隐藏)', name: 'MaterialDemand_YCL', width: 80, align: 'right', sortable: false, hidden: true },
                { label: '实际卷料牌号(隐藏)', name: 'MaterialCode_SJJL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '实际卷料规格(隐藏)', name: 'MaterialSizes_SJJL', width: 80, align: 'right', sortable: false, hidden: true },
                { label: '实际卷料标准编号(隐藏)', name: 'StandardNumber_SJJL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '实际卷料特殊要求(隐藏)', name: 'MaterialDemand_SJJL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '实际板料牌号(隐藏)', name: 'MaterialCode_SJBL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '实际板料规格(隐藏)', name: 'MaterialSizes_SJBL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '实际板料标准编号(隐藏)', name: 'StandardNumber_SJBL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '实际板料特殊要求(隐藏)', name: 'MaterialDemand_SJBL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '捆包号', name: 'Fbatch', width: 120, align: 'left', sortable: false },
                { label: '材料炉批号', name: 'LPH', width: 120, align: 'left', sortable: false },
                { label: '开卷尺寸', name: 'MaterialSizes_K', width: 160, align: 'left', sortable: false },
                { label: '剪切规格', name: 'MaterialSizes_J', width: 160, align: 'left', sortable: false },
                { label: '剪切方向(隐藏)', name: 'BFFX', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '方向', name: 'FiberDirection', width: 40, align: 'center', sortable: false },
                { label: '毛坯<br/>符号', name: 'Sign_MP', width: 60, align: 'center', sortable: false },
                { label: '毛坯<br/>类别', name: 'RoughsType', width: 40, align: 'center', sortable: false },
                { label: '毛坯尺寸', name: 'RoughsSize', width: 160, align: 'left', sortable: false },
                { label: '宽度公差(mm)', name: 'KFGC_KZGC', width: 140, align: 'center', sortable: false, formatter: onGCFormat },
                { label: '宽正公差(隐藏)', name: 'KZGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '宽负公差(隐藏)', name: 'KFGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '长度公差(mm)', name: 'CFGC_CZGC', width: 140, align: 'center', sortable: false, formatter: onGCFormat },
                { label: '长正公差(隐藏)', name: 'KZGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '长负公差(隐藏)', name: 'KFGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '实际一张几块', name: 'FYZJK', width: 60, align: 'center', sortable: false },
                { label: '实际一块几件', name: 'FYKJJ', width: 60, align: 'center', sortable: false },
                { label: '一张钢板可制件数', name: 'FYZJK_FYKJJ', width: 60, align: 'center', sortable: false },
                { label: '可制零件数量', name: 'KZLJ', width: 60, align: 'center', sortable: false },
                { label: '单件计划定额', name: 'DJJHDE', width: 60, align: 'center', sortable: false },
                { label: '单件实际定额', name: 'DJSJDE	', width: 60, align: 'center', sortable: false },
                { label: '一批计划定额', name: 'YPJHDE', width: 60, align: 'center', sortable: false },
                { label: '一批投料定额', name: 'YPTLDE', width: 60, align: 'center', sortable: false },
                { label: '零件净重(kg)	', name: 'PartsNetWeight', width: 60, align: 'center', sortable: false },
                { label: '材料定额(kg)', name: 'MaterialQuota', width: 60, align: 'center', sortable: false },
                { label: '工艺材料利用率', name: 'LYL_GY', width: 60, align: 'center', sortable: false, formatter: onPercentFormat },
                { label: '投料材料利用率', name: 'LYL_TL', width: 60, align: 'center', sortable: false, formatter: onPercentFormat },
                { label: '余料规格1', name: 'YLGG1', width: 160, align: 'center', sortable: false },
                { label: '余料数量1', name: 'YLSL1', width: 60, align: 'right', sortable: false },
                { label: '余料规格2', name: 'YLGG2', width: 160, align: 'center', sortable: false },
                { label: '余料数量2', name: 'YLSL2', width: 160, align: 'right', sortable: false },
                { label: '余料规格3', name: 'YLGG3	', width: 60, align: 'center', sortable: false },
                { label: '余料数量3', name: 'YLSL3', width: 160, align: 'right', sortable: false },
                { label: '实测材料<br/>板厚', name: 'ACTUAL_CLBH', width: 60, align: 'left', sortable: false },
                { label: '实测材料<br/>板宽', name: 'Actual_CLBK	', width: 60, align: 'left', sortable: false },
                { label: '实测材料<br/>理论卷长', name: 'Actual_LLJC', width: 60, align: 'left', sortable: false },
                { label: '实测板料<br/>张数', name: 'Actual_BLZS', width: 60, align: 'left', sortable: false },
                { label: '实测投料<br/>条料数量', name: 'Actual_TLTLSL', width: 60, align: 'left', sortable: false },
                { label: '实测投料<br/>零件数量', name: 'Actual_TLLJSL', width: 60, align: 'left', sortable: false },
                { label: '料头规格', name: 'BTGG', width: 160, align: 'left', sortable: false },
                { label: '料头重量', name: 'BTZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '料尾规格', name: 'BWGG', width: 160, align: 'left', sortable: false },
                { label: '料尾重量', name: 'BWZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '一级废料规格', name: 'FLGG1', width: 160, align: 'left', sortable: false },
                { label: '一级废料重量', name: 'FLZL1', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '二级废料规格', name: 'FLGG2	', width: 160, align: 'left', sortable: false },
                { label: '二级废料重量', name: 'FLZL2', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '三级废料规格', name: 'FLGG3', width: 160, align: 'left', sortable: false },
                { label: '三级废料重量', name: 'FLZL3', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '实测材料<br/>理论重量', name: 'Actual_CLLLZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '实际出库<br/>材料重量', name: 'Actual_CKCLZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '输入人员', name: 'InputUser', width: 60, align: 'center', sortable: false },
                { label: '输入日期', name: 'InputDate', width: 60, align: 'center', sortable: false },
                { label: '输入时间', name: 'InputTime', width: 60, align: 'center', sortable: false },
                { label: '审核人员', name: 'FAuditingBy', width: 60, align: 'center', sortable: false },
                { label: '审核日期', name: 'FAuditingDate', width: 60, align: 'center', sortable: false },
                { label: '审核时间', name: 'FAuditingTime', width: 60, align: 'center', sortable: false },
                { label: '采购人员', name: 'FCGRY', width: 60, align: 'center', sortable: false },
                { label: '采购日期', name: 'FCGRQ', width: 60, align: 'center', sortable: false },
                { label: '采购时间', name: 'FCGRSJ', width: 60, align: 'center', sortable: false },
                { label: '出库人员', name: 'FCKRY', width: 60, align: 'center', sortable: false },
                { label: '出库日期', name: 'FCKRQ', width: 60, align: 'center', sortable: false },
                { label: '出库时间', name: 'FCKSJ', width: 60, align: 'center', sortable: false },
                { label: '出库审核<br/>实发零件数量', name: 'FSHZS', width: 100, align: 'right', sortable: false, formatter: "number" },
                { label: '出库审核<br/>实发材料重量', name: 'FSHZL', width: 100, align: 'right', sortable: false, formatter: "number" },
                { label: '化验结果', name: 'FCKJG', width: 120, align: 'left', sortable: false },
                { label: '剪切收料人员', name: 'FSLRY', width: 60, align: 'center', sortable: false },
                { label: '剪切收料日期', name: 'FSLRQ', width: 60, align: 'center', sortable: false },
                { label: '剪切收料时间', name: 'FSLRSJ', width: 60, align: 'center', sortable: false },
                { label: '剪切收料数量', name: 'FSLSL', width: 60, align: 'center', sortable: false },
                { label: '剪切检查人员', name: 'FJQRY', width: 60, align: 'center', sortable: false },
                { label: '剪切检查日期', name: 'FJQRQ', width: 60, align: 'center', sortable: false },
                { label: '剪切检查时间', name: 'FJQSJ', width: 60, align: 'center', sortable: false },
                { label: '剪切检查结果', name: 'FJQJG', width: 120, align: 'left', sortable: false },
                { label: '车间收料人员', name: 'FCJRY', width: 60, align: 'center', sortable: false },
                { label: '车间收料日期', name: 'FCJRQ', width: 60, align: 'center', sortable: false },
                { label: '车间收料时间', name: 'FCJRSJ', width: 60, align: 'center', sortable: false },
                { label: '车间收料数量', name: 'FCJSL', width: 60, align: 'center', sortable: false },
                { label: '备注说明', name: 'FBZSM', width: 160, align: 'left', sortable: false }
                ],
                pager: "#gridPager1",
                sortname: 'MatNO',
                sortorder: "DESC",
                viewrecords: true,
                rownumWidth: 50,
                onSelectRow: function (rowId) {

                },
                loadComplete: function (data) {
                    Index.dataList["0"] = data.rows;
                }
            });


            $gridList1.jqGrid('setFrozenColumns');

            $gridList1.jqGrid('setLabel', 0, '序号', 'rowNumberHeaderStyle');

            var conn2 = $.buildPostParam("ProductMonth,MaintainStatus,RequireCompanyNO,MatNO,ProductionNO,ProductionName,MaterialCode_SJJL,MaterialSizes_SJJL", "1");

            var $gridList2 = $("#gridList2");
            $gridList2.dataGridForJson({
                url: "/ProductionPlan/PreparationMaterials/GetMaterialOperationsArchive",
                postData: conn2,
                height: $(window).height() - 220,
                colModel: [
                 { label: '编辑日期', name: 'FCreateDate_FCreateTime', width: 160, align: 'center', sortable: false, frozen: true },
                { label: '生产日期', name: 'ProductDate', width: 80, align: 'center', sortable: false, frozen: true },
                { label: '运行单号', name: 'MatNO', width: 160, align: 'left', sortable: false, frozen: true },
                { label: '状态', name: 'MaintainStatus', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat2 },
                { label: '是否<br/>剪切', name: 'isJQ', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat },
                { label: '是否<br/>外委', name: 'FIsWW', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat },
                { label: '下料<br/>方式', name: 'IsBZGY', width: 40, align: 'center', sortable: true, frozen: true },
                { label: '剪切<br/>图形', name: 'IsImg', width: 40, align: 'center', sortable: false, frozen: true, formatter: onLoadDicsFormat },
                { label: '生产单位(隐藏)', name: 'ProductCompany', width: 90, align: 'left', sortable: false, hidden: true },
                { label: '生产单位', name: 'ProductCompanyName', width: 120, align: 'left', sortable: false },
                { label: '生产车间<br/>(要货单位)', name: 'WorkShop', width: 120, align: 'left', sortable: false, hidden: true },
                { label: '生产车间', name: 'WorkShopName', width: 120, align: 'left', sortable: false },
                { label: '需求单位', name: 'RequireCompanyNO', width: 60, align: 'left', sortable: false, hidden: true },
                { label: '需求单位', name: 'RequireCompanyName', width: 120, align: 'left', sortable: false },
               { label: '供货单位', name: 'ProCompanyNO', width: 90, align: 'left', sortable: false, hidden: true },
                { label: '供货单位', name: 'ProCompanyName', width: 120, align: 'left', sortable: false },
                { label: '零件编号', name: 'ProductionNO', width: 120, align: 'left', sortable: false },
                { label: '零件名称', name: 'ProductionName', width: 160, align: 'left', sortable: false },
                { label: '零件标准<br/>装箱数', name: 'Fcontent', width: 80, align: 'right', sortable: true },
                { label: '投料产量', name: 'TLCL', width: 80, align: 'right', sortable: false, formatter: "number" },
                { label: '投料重量<br/>(kg)', name: 'TLZL', width: 80, align: 'right', sortable: false, formatter: "number" },
                { label: '钢板张数', name: 'Actual _ZTLZS', width: 60, align: 'right', sortable: false },
                 { label: '计划开卷板料张数(隐藏)', name: 'Plane_KJZS', width: 80, align: 'right', sortable: false, hidden: true },
                 { label: '计划开卷板料重量(隐藏)', name: 'Plane_KJZL', width: 120, align: 'right', sortable: false, hidden: true },
                { label: '计划实际板料张数（隐藏）', name: 'Plane_SJZS', width: 120, align: 'right', sortable: false, hidden: true },
                { label: '计划实际板料重量（隐藏）', name: 'Plane_SJZL', width: 100, align: 'right', sortable: false, hidden: true },
                { label: '材料分类(隐藏)', name: 'MaterialNO', width: 100, align: 'right', sortable: false, hidden: true },
                { label: '材料分类', name: 'MaterialName', width: 120, align: 'left', sortable: false },
                { label: '卷料牌号', name: 'MaterialCode_YCL_MaterialCode_SJJL', width: 140, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '卷料规格', name: 'MaterialSizes_YCL_MaterialSizes_BL', width: 200, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '板料牌号', name: 'MaterialCode_BL_MaterialCode_SJBL', width: 140, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '板料规格', name: 'MaterialSizes_BL_MaterialSizes_SJBL', width: 200, align: 'left', sortable: false, formatter: onMaterialFormat },
                { label: '工艺卷料牌号(隐藏)', name: 'MaterialCode_YCL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '工艺卷料规格(隐藏)', name: 'MaterialSizes_YCL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '工艺板料牌号(隐藏)', name: 'MaterialCode_BL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '工艺板料规格(隐藏)', name: 'MaterialSizes_BL', width: 80, align: 'right', sortable: false, hidden: true },
                { label: '工艺标准编号(隐藏)', name: 'StandardNumber_YCL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '工艺特殊要求(隐藏)', name: 'MaterialDemand_YCL', width: 80, align: 'right', sortable: false, hidden: true },
                { label: '实际卷料牌号(隐藏)', name: 'MaterialCode_SJJL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '实际卷料规格(隐藏)', name: 'MaterialSizes_SJJL', width: 80, align: 'right', sortable: false, hidden: true },
                { label: '实际卷料标准编号(隐藏)', name: 'StandardNumber_SJJL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '实际卷料特殊要求(隐藏)', name: 'MaterialDemand_SJJL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '实际板料牌号(隐藏)', name: 'MaterialCode_SJBL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '实际板料规格(隐藏)', name: 'MaterialSizes_SJBL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '实际板料标准编号(隐藏)', name: 'StandardNumber_SJBL', width: 160, align: 'left', sortable: false, hidden: true },
                { label: '实际板料特殊要求(隐藏)', name: 'MaterialDemand_SJBL', width: 80, align: 'center', sortable: false, hidden: true },
                { label: '捆包号', name: 'Fbatch', width: 120, align: 'left', sortable: false },
                { label: '材料炉批号', name: 'LPH', width: 120, align: 'left', sortable: false },
                { label: '开卷尺寸', name: 'MaterialSizes_K', width: 160, align: 'left', sortable: false },
                { label: '剪切规格', name: 'MaterialSizes_J', width: 160, align: 'left', sortable: false },
                { label: '剪切方向(隐藏)', name: 'BFFX', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '方向', name: 'FiberDirection', width: 40, align: 'center', sortable: false },
                { label: '毛坯<br/>符号', name: 'Sign_MP', width: 60, align: 'center', sortable: false },
                { label: '毛坯<br/>类别', name: 'RoughsType', width: 40, align: 'center', sortable: false },
                { label: '毛坯尺寸', name: 'RoughsSize', width: 160, align: 'left', sortable: false },
                { label: '宽度公差(mm)', name: 'KFGC_KZGC', width: 140, align: 'center', sortable: false, formatter: onGCFormat },
                { label: '宽正公差(隐藏)', name: 'KZGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '宽负公差(隐藏)', name: 'KFGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '长度公差(mm)', name: 'CFGC_CZGC', width: 140, align: 'center', sortable: false, formatter: onGCFormat },
                { label: '长正公差(隐藏)', name: 'KZGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '长负公差(隐藏)', name: 'KFGC', width: 60, align: 'center', sortable: false, hidden: true },
                { label: '实际一张几块', name: 'FYZJK', width: 60, align: 'center', sortable: false },
                { label: '实际一块几件', name: 'FYKJJ', width: 60, align: 'center', sortable: false },
                { label: '一张钢板可制件数', name: 'FYZJK_FYKJJ', width: 60, align: 'center', sortable: false },
                { label: '可制零件数量', name: 'KZLJ', width: 60, align: 'center', sortable: false },
                { label: '单件计划定额', name: 'DJJHDE', width: 60, align: 'center', sortable: false },
                { label: '单件实际定额', name: 'DJSJDE	', width: 60, align: 'center', sortable: false },
                { label: '一批计划定额', name: 'YPJHDE', width: 60, align: 'center', sortable: false },
                { label: '一批投料定额', name: 'YPTLDE', width: 60, align: 'center', sortable: false },
                { label: '零件净重(kg)	', name: 'PartsNetWeight', width: 60, align: 'center', sortable: false },
                { label: '材料定额(kg)', name: 'MaterialQuota', width: 60, align: 'center', sortable: false },
                { label: '工艺材料利用率', name: 'LYL_GY', width: 60, align: 'center', sortable: false },
                { label: '投料材料利用率', name: 'LYL_TL', width: 60, align: 'center', sortable: false },
                { label: '余料规格1', name: 'YLGG1', width: 160, align: 'center', sortable: false },
                { label: '余料数量1', name: 'YLSL1', width: 60, align: 'right', sortable: false },
                { label: '余料规格2', name: 'YLGG2', width: 160, align: 'center', sortable: false },
                { label: '余料数量2', name: 'YLSL2', width: 160, align: 'right', sortable: false },
                { label: '余料规格3', name: 'YLGG3	', width: 60, align: 'center', sortable: false },
                { label: '余料数量3', name: 'YLSL3', width: 160, align: 'right', sortable: false },
                { label: '实测材料<br/>板厚', name: 'ACTUAL_CLBH', width: 60, align: 'left', sortable: false },
                { label: '实测材料<br/>板宽', name: 'Actual_CLBK	', width: 60, align: 'left', sortable: false },
                { label: '实测材料<br/>理论卷长', name: 'Actual_LLJC', width: 60, align: 'left', sortable: false },
                { label: '实测板料<br/>张数', name: 'Actual_BLZS', width: 60, align: 'left', sortable: false },
                { label: '实测投料<br/>条料数量', name: 'Actual_TLTLSL', width: 60, align: 'left', sortable: false },
                { label: '实测投料<br/>零件数量', name: 'Actual_TLLJSL', width: 60, align: 'left', sortable: false },
                { label: '料头规格', name: 'BTGG', width: 160, align: 'left', sortable: false },
                { label: '料头重量', name: 'BTZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '料尾规格', name: 'BWGG', width: 160, align: 'left', sortable: false },
                { label: '料尾重量', name: 'BWZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '一级废料规格', name: 'FLGG1', width: 160, align: 'left', sortable: false },
                { label: '一级废料重量', name: 'FLZL1', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '二级废料规格', name: 'FLGG2	', width: 160, align: 'left', sortable: false },
                { label: '二级废料重量', name: 'FLZL2', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '三级废料规格', name: 'FLGG3', width: 160, align: 'left', sortable: false },
                { label: '三级废料重量', name: 'FLZL3', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '实测材料<br/>理论重量', name: 'Actual_CLLLZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '实际出库<br/>材料重量', name: 'Actual_CKCLZL', width: 60, align: 'right', sortable: false, formatter: "number" },
                { label: '输入人员', name: 'InputUser', width: 60, align: 'center', sortable: false },
                { label: '输入日期', name: 'InputDate', width: 60, align: 'center', sortable: false },
                { label: '输入时间', name: 'InputTime', width: 60, align: 'center', sortable: false },
                { label: '审核人员', name: 'FAuditingBy', width: 60, align: 'center', sortable: false },
                { label: '审核日期', name: 'FAuditingDate', width: 60, align: 'center', sortable: false },
                { label: '审核时间', name: 'FAuditingTime', width: 60, align: 'center', sortable: false },
                { label: '采购人员', name: 'FCGRY', width: 60, align: 'center', sortable: false },
                { label: '采购日期', name: 'FCGRQ', width: 60, align: 'center', sortable: false },
                { label: '采购时间', name: 'FCGRSJ', width: 60, align: 'center', sortable: false },
                { label: '出库人员', name: 'FCKRY', width: 60, align: 'center', sortable: false },
                { label: '出库日期', name: 'FCKRQ', width: 60, align: 'center', sortable: false },
                { label: '出库时间', name: 'FCKSJ', width: 60, align: 'center', sortable: false },
                { label: '出库审核<br/>实发零件数量', name: 'FSHZS', width: 100, align: 'right', sortable: false, formatter: "number" },
                { label: '出库审核<br/>实发材料重量', name: 'FSHZL', width: 100, align: 'right', sortable: false, formatter: "number" },
                { label: '化验结果', name: 'FCKJG', width: 120, align: 'left', sortable: false },
                { label: '剪切收料人员', name: 'FSLRY', width: 60, align: 'center', sortable: false },
                { label: '剪切收料日期', name: 'FSLRQ', width: 60, align: 'center', sortable: false },
                { label: '剪切收料时间', name: 'FSLRSJ', width: 60, align: 'center', sortable: false },
                { label: '剪切收料数量', name: 'FSLSL', width: 60, align: 'center', sortable: false },
                { label: '剪切检查人员', name: 'FJQRY', width: 60, align: 'center', sortable: false },
                { label: '剪切检查日期', name: 'FJQRQ', width: 60, align: 'center', sortable: false },
                { label: '剪切检查时间', name: 'FJQSJ', width: 60, align: 'center', sortable: false },
                { label: '剪切检查结果', name: 'FJQJG', width: 120, align: 'left', sortable: false },
                { label: '车间收料人员', name: 'FCJRY', width: 60, align: 'center', sortable: false },
                { label: '车间收料日期', name: 'FCJRQ', width: 60, align: 'center', sortable: false },
                { label: '车间收料时间', name: 'FCJRSJ', width: 60, align: 'center', sortable: false },
                { label: '车间收料数量', name: 'FCJSL', width: 60, align: 'center', sortable: false },
                { label: '备注说明', name: 'FBZSM', width: 160, align: 'left', sortable: false }
                ],
                pager: "#gridPager2",
                sortname: 'MatNO',
                sortorder: "DESC",
                viewrecords: true,
                rownumWidth: 50,
                onSelectRow: function (rowId) {
                    rowData = $gridList2.jqGrid('getRowData', rowId);
                    index = rowId;
                    $.each(rowData, function (key, value) {
                        $("#txt" + key).val(value);
                    });
                },
                loadComplete: function (data) {
                    Index.dataList["1"] = data.rows;
                }
            });
            $gridList2.jqGrid('setFrozenColumns');

            $gridList2.jqGrid('setLabel', 0, '序号', 'rowNumberHeaderStyle');

            var customFmatter = function (cellvalue, options, rowObject) {
                return "{0}%".format(cellvalue * 100);
            };
        }, buildExportConn: function (params, num) {
            var conn = "";

            !num && (num = "");

            params.forEach(function (item) {
                var val = $("#{0}{1}".format(item, num)).val();

                !!val && (conn += ("and {0} = '{1}'".format(item, val)));
            });

            return conn;
        },
        getMaxDay: function () {
            var r = 31, m = new Date().getMonth() + 1, y = new Date().getFullYear(), sec = [4, 6, 9, 11];
            //能被4整除但不能被100整除，或能被400整除的年份
            2 == m && (r = (((0 == y % 4 && 0 != y % 100) || 0 == y % 400) ? 29 : 28));

            sec.indexOf(m) && (m = 30);

            return r;
        }
    };



</script>
<div class="layout" id="layout" style="height: 100%; width: 100%;">
    <div class="tool_c">
        <div class="btn-group">
            <input type="radio" id="ra01" value="0" name="ra0" /><label for="ra01">编辑	</label>
            <br />
            <input type="radio" id="ra02" value="1" name="ra0" /><label for="ra02">	档案 </label>
            <br />
        </div>
        <div class="btn-group input-width-80">
            &nbsp;日期<br />
            <input id="ProductMonth1" name="" placeholder="" type="text" class="form-control required" my97date="yyyyMM" />
        </div>
        <div class="btn-group  input-width-80">
            &nbsp;状态<br />
            <select id="MaintainStatus1" name="" class="form-control">
                <option value="">--请选择--</option>
            </select>
        </div>
        <div class="btn-group input-width-105">
            &nbsp;要货单位<br />
            <select id="RequireCompanyNO1" name="" class="form-control">
                <option value="">--请选择--</option>
            </select>
        </div>
        <div class="btn-group  input-width-105">
            &nbsp;运行单号
            <input id="MatNO1" name="" placeholder="请输入运行单号" type="text" class="form-control required" />
        </div>
        <div class="btn-group  input-width-105">
            &nbsp;零件编号
            <input id="ProductionNO1" name="" placeholder="请输入运行单号" type="text" class="form-control required" />
        </div>
        <div class="btn-group">
            &nbsp;零件名称
            <input id="FProductionName1" name="" placeholder="请输入运行单号" type="text" class="form-control required" />
        </div>
        <div class="btn-group  input-width-105">
            &nbsp;材料牌号
            <input id="MaterialCode_SJJL1" name="" placeholder="请输入材料牌号" type="text" class="form-control required" />
        </div>
        <div class="btn-group  input-width-105">
            &nbsp;	材料规格
            <input id="MaterialSizes_SJJL1" name="" placeholder="请输入厚*宽*长" type="text" class="form-control required" />
        </div>
        <div class="btn-group">
            <a id="btn_search1" class="btn btn-primary center-block"><span class="glyphicon glyphicon-search"></span>查询</a>
            <a class="btn btn-primary center-block" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span>&nbsp刷新</a>
            <a id="butnGoAdd" class="btn btn-primary center-block i1 i11"><span class="glyphicon glyphicon-plus"></span>输入</a>
            <a id="butnDelete" class="btn btn-primary center-block i1 i12"><span class="glyphicon glyphicon-trash"></span>删除</a>
            <a id="butnGoScheme" class="btn btn-primary center-block i1 i17"><span class="glyphicon glyphicon-list-alt"></span>方案</a>
            <a id="butnGoInvalid" class="btn btn-primary center-block i1 i13"><span class="glyphicon glyphicon-remove"></span>作废</a>
            <a id="butnPublish" class="btn btn-primary center-block i1 i14"><span class="glyphicon glyphicon-envelope"></span>发布</a>
            <a id="butnPrint" class="btn btn-primary center-block i1 i15"><span class="glyphicon glyphicon-print"></span>打印</a>
            <a id="butnExport" class="btn btn-primary center-block i1 i16"><span class="glyphicon glyphicon-export"></span>导出</a>
        </div>
    </div>
    <div class="grid_list_1_c i1 i18" style="margin-top: 5px;">
        <table id="gridList1"></table>
        <div id="gridPager1"></div>
    </div>
    <div class="grid_list_2_c i1 i19" style="margin-top: 5px;">
        <table id="gridList2"></table>
        <div id="gridPager2"></div>
    </div>
    <div id="print" class="print">
        <div class="page">
            <header>
                <h1>{title}</h1>
                <aside>
                    <img src="{bar_code}" alt="barcode" title="barcode" />
                </aside>
                <aside>
                    <img src="{qr_code}" alt="qrcode" title="qrcode" />
                </aside>
            </header>
            <div class="line">
                <div class="item">
                    <label>编制日期：</label>{InputDate}
                </div>
                <div class="item">
                    <label>上线日期：</label>{ProductDate}
                </div>
                <div class="item">
                    <label>发单日期：</label>{FAuditingDate}
                </div>
                <div class="item">
                    <label>车型编号：</label>{FCXBH}
                </div>
            </div>
            <div class="table_c">
                <table>
                    <tr>
                        <td>1
                        </td>
                        <td>2
                        </td>
                        <td>3
                        </td>
                        <td>4
                        </td>
                        <td>5
                        </td>
                        <td>6
                        </td>
                        <td>7
                        </td>
                        <td>8
                        </td>
                        <td>9
                        </td>
                        <td>10
                        </td>
                        <td>11
                        </td>
                        <td>12
                        </td>
                        <td>13
                        </td>
                        <td>14
                        </td>
                        <td>15
                        </td>
                        <td>16
                        </td>
                        <td>17
                        </td>
                        <td>18
                        </td>
                        <td>19
                        </td>
                        <td>20
                        </td>
                    </tr>
                    <tr>
                        <td rowspan="12" class="center">
                            <label>材料计划员填</label>
                        </td>
                        <td colspan="2" class="center">零件号
                        </td>
                        <td colspan="5">{ProductionNO}
                        </td>
                        <td colspan="2" class="center">分解状态
                        </td>
                        <td colspan="3" class="center">剪切规格
                        </td>
                        <td class="center">毛坯<br />
                            类别
                        </td>
                        <td class="center">毛坯<br />
                            方向
                        </td>
                        <td colspan="5">一个零件毛坯尺寸
                        </td>
                    </tr>
                    <tr>

                        <td colspan="2" class="center">零件名称
                        </td>
                        <td colspan="5">{FProductionName}
                        </td>
                        <td colspan="2" class="center">{DecomposeState}
                        </td>
                        <td colspan="3" class="center">{MaterialSizes_J}
                        </td>
                        <td class="center">{RoughsType}
                        </td>
                        <td class="center">{FiberDirection}</td>
                        <td colspan="5"><span>{KFGC_KZGC}</span><span>{CFGC_CZGC}</span><br />
                            {RoughsSize}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="center">计划产量
                        </td>
                        <td colspan="3" class="right">{FJHCL}件
                        </td>
                        <td colspan="2">投料产量
                        </td>
                        <td colspan="3">{TLCL}件
                        </td>
                        <td class="center">状态
                        </td>
                        <td colspan="2">{MaintainStatus}</td>
                        <td colspan="3" class="center">零件标箱
                        </td>
                        <td colspan="3">{Fcontent}</td>
                    </tr>
                    <tr>
                        <td colspan="2" class="center">计划重量
                        </td>
                        <td colspan="3" class="right">{FJHZL}Kg
                        </td>
                        <td colspan="2">工艺消耗
                        </td>
                        <td colspan="3">{TechWear}Kg</td>
                        <td class="center">是否<br />
                            剪切
                        </td>
                        <td colspan="2">{isJQ}
                        </td>
                        <td colspan="3" class="center">零件特性
                        </td>
                        <td colspan="3">{Features}</td>
                    </tr>
                    <tr>

                        <td rowspan="4" class="center">
                            <label>材料</label>
                        </td>
                        <td class="center">工艺卷料
                        </td>
                        <td colspan="4">{MaterialCode_YCL}</td>
                        <td colspan="4">{MaterialSizes_YCL}</td>
                        <td>是否<br />
                            作废
                        </td>
                        <td colspan="2">{MaintainStatus}
                        </td>
                        <td colspan="3">车间
                        </td>
                        <td colspan="3">{WorkShopName}
                        </td>
                    </tr>
                    <tr>
                        <td class="center">工艺板料
                        </td>
                        <td colspan="4">{MaterialCode_BL}
                        </td>
                        <td colspan="4">{MaterialSizes_BL}
                        </td>
                        <td colspan="3" class="center">开卷尺寸
                        </td>
                        <td colspan="3" class="center">张数（张）
                        </td>
                        <td colspan="2" class="center">计划重量
                        </td>
                        <td class="center">总投料
                        </td>
                    </tr>
                    <tr>
                        <td class="center">实际卷料
                        </td>
                        <td colspan="4">{MaterialCode_SJJL}</td>
                        <td colspan="4">{MaterialSizes_SJJL}</td>
                        <td colspan="3" class="right">{MaterialSizes_K}</td>
                        <td colspan="3" class="right">{Plane_KJZS}</td>
                        <td colspan="2" class="right">{Plane_KJZL}Kg
                        </td>
                        <td class="right">{Plane_KJZS_Plane_SJZS}张
                        </td>
                    </tr>
                    <tr>
                        <td class="center">实际板料
                        </td>
                        <td colspan="4">{MaterialCode_SJBL}
                        </td>
                        <td colspan="4">{MaterialSizes_SJBL}
                        </td>
                        <td colspan="3" class="right"></td>
                        <td colspan="3" class="right">{Plane_SJZS}张
                        </td>
                        <td colspan="2" class="right">{Plane_SJZL}
                        </td>
                        <td class="right">{Plane_KJZL_Plane_SJZL}Kg
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3"></td>
                        <td class="center">规格
                        </td>
                        <td class="center" colspan="2">实际
                        </td>
                        <td class="center" colspan="7">偏差原因说明
                        </td>
                        <td class="center" colspan="6">定额比较
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">1张板切几块
                        </td>
                        <td>{FYZJK_GY}
                        </td>
                        <td class="center" colspan="2">{FYZJK}
                        </td>
                        <td class="center" colspan="7">{FErrorK1}</td>
                        <td class="center" colspan="2"></td>
                        <td colspan="2">计划定额
                        </td>
                        <td colspan="2">实际定额
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">1块切几个零件
                        </td>
                        <td>{FYKJJ_GY}
                        </td>
                        <td class="center" colspan="2">{FYKJJ}
                        </td>
                        <td class="center" colspan="7">{FErrorK2}</td>
                        <td class="center" colspan="2">单件
                        </td>
                        <td colspan="2">{DJJHDE}</td>
                        <td colspan="2">{DJSJDE}</td>
                    </tr>
                    <tr>
                        <td colspan="3">1张切几个零件
                        </td>
                        <td>{FYZJK_GY_FYKJJ_GY}
                        </td>
                        <td class="center" colspan="2">{FYZJK_FYKJJ}
                        </td>
                        <td class="center" colspan="7">{FErrorK3}</td>
                        <td class="center" colspan="2">一批
                        </td>
                        <td colspan="2">{YPJHDE}</td>
                        <td colspan="2">{YPTLDE}</td>
                    </tr>
                    <tr>
                        <td rowspan="6" class="center">
                            <label>相关部门填</label>
                        </td>
                        <td colspan="2" class="center">计划员
                        </td>
                        <td colspan="2" class="center">{FAuditingBy}
                        </td>
                        <td colspan="3" class="center">{FAuditingDate}
                        </td>
                        <td colspan="2">是否退料
                        </td>
                        <td colspan="4">{FIsReturn}</td>
                        <td colspan="2">炉批号
                        </td>
                        <td colspan="2">{LPH}</td>
                        <td colspan="2"></td>
                    </tr>
                    <tr>
                        <td colspan="2" class="center">保管员
                        </td>
                        <td colspan="2" class="center">{FCGRY}</td>
                        <td colspan="3" class="center">{FCGRQ}</td>
                        <td colspan="2">实发数
                        </td>
                        <td class="right">{FSHZS}张
                        </td>
                        <td colspan="3" class="right">{FSHZL}kg
                        </td>
                        <td colspan="2" class="center">捆包号
                        </td>
                        <td colspan="2">{Fbatch}</td>
                        <td colspan="2"></td>
                    </tr>
                    <tr>
                        <td colspan="2" class="center">出库检查员
                        </td>
                        <td colspan="2" class="center">{FCKRY}</td>
                        <td colspan="3" class="center">{FCKRQ}</td>
                        <td colspan="3" class="center">化验结果
                        </td>
                        <td colspan="3" class="right">{FCKJG}</td>
                        <td colspan="2" class="center">一级废料
                        </td>
                        <td colspan="2">{FLGG1}</td>
                        <td colspan="2">{FLZL1}</td>
                    </tr>
                    <tr>
                        <td colspan="2" class="center">剪切收料员
                        </td>
                        <td colspan="2" class="center">{FSLRY}</td>
                        <td colspan="3" class="center">{FSLRQ}</td>
                        <td colspan="3" class="center">实收数量
                        </td>
                        <td colspan="3" class="right">{FSLSL}</td>
                        <td colspan="2" class="center">二级废料
                        </td>
                        <td colspan="2">{FLGG2}</td>
                        <td colspan="2">{FLZL2}</td>
                    </tr>
                    <tr>
                        <td colspan="2" class="center">剪切检查员
                        </td>
                        <td colspan="2" class="center">{FJQRY}</td>
                        <td colspan="3" class="center">{FJQRQ}</td>
                        <td colspan="3" class="center">检查结果
                        </td>
                        <td colspan="3" class="right">{FJQJG}</td>
                        <td colspan="2" class="center">三级废料
                        </td>
                        <td colspan="2">{FLGG3}</td>
                        <td colspan="2">{FLZL3}</td>
                    </tr>
                    <tr>

                        <td colspan="2" class="center">车间收料员
                        </td>
                        <td colspan="2" class="center">{FCJRY}</td>
                        <td colspan="3" class="center">{FCJRQ}</td>
                        <td colspan="3" class="center">实收数量
                        </td>
                        <td colspan="3" class="right">{FCJSL}</td>
                        <td colspan="2" class="center">其它
                        </td>
                        <td colspan="2">{YLGG1}{YLSL1}</td>
                        <td colspan="2">{YLGG2}{YLSL2}</td>
                    </tr>
                    <tr>
                        <td colspan="20">备注：{FBZSM}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="20">{image}</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>



